<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>是否确认充值</title>
		<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
		</script>
		<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
	</head>
	<body>
		<label>是否确认充值</label>
		<button onclick="qr()">确认(支付宝网页充值)</button>
	</body>
	<script>
		function qr()
		{
			var orderId =sessionStorage.getItem("orderId")
			var orderMoney =sessionStorage.getItem("orderMoney")
			var accountID =sessionStorage.getItem("accountID")
			console.log(orderId)
			console.log(accountID)
			console.log(orderMoney)
			var obj={
				"orderId":orderId,
				"orderMoney":orderMoney,
				"orderTitle":accountID
			}
			var str =JSON.stringify(obj)
			$.ajax({
				url:'mall/paycz.do',
				type:'post',
				dataType:"json",
				contentType:"application/json",
				data:str,
				success(resp) {
					console.log(resp.data)
					if(resp.code==201)
					{
						alert("请不要重复提交支付订单")
					}
					else{
						sessionStorage.setItem("str",resp.data)
						window.location.replace("zfym.html")
					}
					
				},
				error() {
					alert("错误信息")
				},
			})
		}
	</script>
</html>